package com.qf.st.entity;

import java.io.Serializable;

public class ResultData implements Serializable {
    private boolean isSuccess;
    private Object data;

    public ResultData(boolean isSuccess, Object data) {
        this.isSuccess = isSuccess;
        this.data = data;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static ResultData success(Object data) {
        return new ResultData(true, data);
    }

    public static ResultData fail() {
        return new ResultData(false, "失败");
    }
}
